package com.zh.familyInfo.service.impl;

import com.zh.common.utils.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.zh.familyInfo.dao.FamilyRelationUserDao;
import com.zh.familyInfo.domain.FamilyRelationUserDO;
import com.zh.familyInfo.service.FamilyRelationUserService;



@Service
public class FamilyRelationUserServiceImpl implements FamilyRelationUserService {
	@Autowired
	private FamilyRelationUserDao familyRelationUserDao;
	
	@Override
	public FamilyRelationUserDO get(String id){
		return familyRelationUserDao.get(id);
	}
	
	@Override
	public List<FamilyRelationUserDO> list(Map<String, Object> map){
		return familyRelationUserDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return familyRelationUserDao.count(map);
	}
	
	@Override
	public int save(FamilyRelationUserDO familyRelationUser){
		familyRelationUser.setId(StringUtil.generalKeyword());
		return familyRelationUserDao.save(familyRelationUser);
	}
	
	@Override
	public int update(FamilyRelationUserDO familyRelationUser){
		return familyRelationUserDao.update(familyRelationUser);
	}
	
	@Override
	public int remove(String id){
		return familyRelationUserDao.remove(id);
	}
	
	@Override
	public int batchRemove(String[] ids){
		return familyRelationUserDao.batchRemove(ids);
	}

	@Override
	public FamilyRelationUserDO getFamilyRelationByFamilyId(String userId) {
		return familyRelationUserDao.getFamilyRelationByFamilyId(userId);
	}

}
